Disable babl-gen-test-pixels when random is missing
authorDaniel Sabo <DanielSabo@gmail.com>
Sun, 2 Feb 2014 04:22:49 +0000 (20:22 -0800)
committerDaniel Sabo <DanielSabo@gmail.com>
Mon, 3 Feb 2014 06:05:47 +0000 (22:05 -0800)
babl-gen-test-pixels is only needed to regenerate the source
pixels and doesn't need to be run as part of the normal build
process.

configure.ac
tools/Makefile.am

index 96d4ccba9fb703de39d1a7409780ecf57d2b48fd..0781379b599acee81ec7f9e4580978201945c710 100644 (file)
@@ -425,6 +425,13 @@ if test "x$enable_altivec" = xyes; then
 fi
 
 
+##################
+# Check for random
+##################
+have_srandom=no
+AC_CHECK_FUNC(srandom, have_srandom=yes)
+AM_CONDITIONAL([HAVE_SRANDOM], [test x$have_srandom = xyes])
+
 dnl ===========================================================================
 
 AC_CHECK_HEADERS(dl.h)
index ba233c1d41506fa285a41206634c08dc01d0eaa8..f67a66e6b8045bebb33ac714df8ee1e1392fb8ba 100644 (file)
@@ -3,5 +3,7 @@ AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/babl
 LDADD = $(top_builddir)/babl/libbabl-@BABL_API_VERSION@.la \
        $(MATH_LIB)
 
+if HAVE_SRANDOM
 noinst_PROGRAMS =              \
        babl-gen-test-pixels
+endif
\ No newline at end of file